﻿<%@ Page Language="C#" AutoEventWireup="true"  EnableEventValidation="false" EnableViewState="true" CodeBehind="wfOrdenCompra.aspx.cs" Inherits="wfCompras.wfOrdenCompra" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register src="ucControlFecha.ascx" tagname="ucControlFecha" tagprefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %> 

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <link href="../Styles/General.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/token-input-facebook.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/jquery-ui.custom.css" rel="stylesheet" type="text/css" />

    <script src="../Scripts/jquery.min.js" type="text/javascript"></script>
   
    <script src="../Scripts/jquery.tokeninput.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.purr.js" type="text/javascript"></script>
    <script src="../Scripts/General.js" type="text/javascript"></script>
   
    <style type="text/css">
        .style1
        {
            width: 5px;
            height: 15px;
        }
        .style2
        {
            height: 15px;
        }
        .style4
        {
            width: 5px;
            height: 26px;
        }
        .style14
        {
            height: 15px;
            width: 147px;
        }
        </style>

    <script src="js/global.js" type="text/javascript"></script>
     
     <script type="text/javascript">

 

         function fDevolverSeleccion(codigo) {
             document.getElementById("<%= dpProv.ClientID %>").value = codigo
         }

         function fDevolverSeleccion2(codigo, Descrip) {
             document.getElementById("<%= txtCodPago.ClientID %>").value = codigo
             document.getElementById("<%= lblCodPago.ClientID %>").value = Descrip
         }

         function fDevolverSeleccion3(codigo, Descrip) {
             document.getElementById("<%= HiddPedidoPor.ClientID %>").value = codigo
             document.getElementById("<%= lblPedidoPor.ClientID %>").value = Descrip
         }

         function fDevolverSeleccion4(codigo, Descrip) {
             document.getElementById("<%= dpImportacion.ClientID %>").value = codigo
            
         }


         function ResizeGrid() {
             internalGridResize("<%= GVDetalleProducto.ClientID %>");
         }


         function panelOnUpdating() {
             updatePanelAnimationUpdating();
         }


         function panelOnUpdated() {
             ResizeGrid();
             updatePanelAnimationUpdated();
         }

         function fDevolverSeleccion5(codigo, pres, producto, presenta, um, peso_bruto) {
             document.getElementById("<%= hddCodigo.ClientID %>").value = codigo
             document.getElementById("<%= hddPres.ClientID %>").value = pres
             document.getElementById("<%= hddProducto.ClientID %>").value = producto
             document.getElementById("<%= hddPresenta.ClientID %>").value = presenta
             document.getElementById("<%= hddUm.ClientID %>").value = um
             document.getElementById("<%= hddPesoBruto.ClientID %>").value = peso_bruto
         }


         function fLoadNumbers(combo1) {
             DoCallBack("RefreshLoadNumbers", combo1.value, End_fLoadNumbers)
         }
         //---------------------------------------------------------//
         function End_fLoadNumbers(arg) {
             var mData = arg.split(":::");
             document.getElementById("tdValorProv").innerHTML = mData[0];
             //si utilizas jQuery sería así
             //$("#tdValores").html(mData[0]);
         }

    </script>
</head>
<body>
    <form id="form1" runat="server">
     <asp:ScriptManager ID="ScriptManager1" runat="server">
      </asp:ScriptManager>
       
    <input id="dummy" type="button" style="display: none" runat="server" />

   <asp:UpdatePanel ID="udpInnerUpdatePanel" runat="Server" UpdateMode="Conditional">
      <ContentTemplate>


      <div class="ToolBar">
           <asp:ImageButton ID="btnGrabar" runat="server" 
               style="width: 14px" ToolTip="Grabar" onclick="btnGrabar_Click"/>
           
           <asp:Label ID="Label19" runat="server" Font-Bold="True" ForeColor="Black" 
               Text="Grabar"></asp:Label>
           &nbsp;
                      
           <asp:ImageButton ID="btnSalir" runat="server" onclick="btnSalir_Click" 
               style="width: 14px" ToolTip="Buscar" />
           <asp:Label ID="Label20" runat="server" Font-Bold="True" ForeColor="Black" 
               Text="Salir"></asp:Label>
&nbsp;
           </div>

<div style="border: 1px solid #ccc; border-radius: 5px; -moz-border-radius: 5px;-webkit-border-radius: 5px; -ms-border-radius: 5px;">
                                    
        <table width="100%" cellpadding="0" cellspacing="2">
  
            <tr>
                <td style="width: 5px;">
                    &nbsp;
                </td>
                 <table class="style1">
        <tr>
            <td class="style2">
                <asp:Label ID="Label1" runat="server" Font-Size="Small" 
                    style="font-size: x-small" Text="Fecha O/C"></asp:Label>
            </td>
            <td class="style19" colspan="2">
                <uc1:ucControlFecha ID="ucControlFecha1" runat="server" />
            </td>
            <td class="style47">
                &nbsp;</td>
            <td align="right" class="style67">
                <asp:Label ID="Label11" runat="server" style="font-size: x-small" 
                    Text="Cond. Pago"></asp:Label>
            </td>
            <td align="left" class="style69">
                <asp:TextBox ID="txtCodPago" CssClass="esdTextBox" runat="server" Width="50px"></asp:TextBox>
            </td>
            <td class="style64">
                <asp:ImageButton ID="btnBuscarCondPago" runat="server" 
                    onclick="btnBuscarCondPago_Click" style="width: 14px" />
            </td>
            <td class="style71">
                <asp:TextBox ID="lblCodPago"  CssClass="esdTextBox" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label2" runat="server" style="font-size: x-small" 
                    Text="Proveedor"></asp:Label>
            </td>
            <td id="tdValorProv">
                <asp:DropDownList ID="dpProv" runat="server" Width="200px"  
                    CssClass="esdTextBox">
                </asp:DropDownList>
            </td>
            <td class="style64">
                <asp:ImageButton ID="btnBuscarProv" runat="server" 
                    onclick="btnBuscarProv_Click" Height="16px" />
            </td>
            <td class="style47">
                &nbsp;</td>
            <td align="right" class="style67">
                <asp:Label ID="Label13" runat="server" Text="Tipo"></asp:Label>
            </td>
            <td align="left" class="style69">
                <asp:DropDownList ID="dpTipo" CssClass="esdTextBox"  runat="server" 
                    Width="200px">
                </asp:DropDownList>
            </td>
            <td class="style41" colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label3" runat="server" style="font-size: x-small" 
                    Text="Entrega en"></asp:Label>
            </td>
            <td class="style36">
                <asp:DropDownList ID="dpEntregaPor" runat="server" Width="200px"  
                    CssClass="esdTextBox">
                </asp:DropDownList>
            </td>
            <td class="style64">
                &nbsp;</td>
            <td class="style47">
                &nbsp;</td>
            <td align="right" class="style67">
                <asp:Label ID="Label14" runat="server" style="font-size: x-small" 
                    Text="Modalidad"></asp:Label>
            </td>
            <td align="left" class="style69">
                <asp:DropDownList ID="dpModalidad" CssClass="esdTextBox" runat="server" 
                    Width="200px">
                </asp:DropDownList>
            </td>
            <td class="style41" colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style4">
                <asp:Label ID="Label4" runat="server" style="font-size: x-small" 
                    Text="Pedido por"></asp:Label>
            </td>
            <td class="style18">
             <input id="HiddPedidoPor" runat="server" name="HiddPedidoPor" size="4" style="width: 56px;
                    height: 0px" type="hidden" />
                <asp:TextBox ID="lblPedidoPor" runat="server" CssClass="esdTextBox"></asp:TextBox>
            </td>
            <td class="style14">
                <asp:ImageButton ID="btnBuscarPedido" runat="server" Width="16px" 
                    onclick="btnBuscarPedido_Click" />
            </td>
            <td class="style48">
                &nbsp;</td>
            <td align="right" class="style32">
                <asp:Label ID="Label15" runat="server" style="font-size: x-small" 
                    Text="Importacion"></asp:Label>
            </td>
            <td align="left" class="style50">
             
                <asp:DropDownList ID="dpImportacion" runat="server" CssClass="esdTextBox" 
                    Width="200px">
                </asp:DropDownList>
            </td>
            <td class="style14">
                <asp:ImageButton ID="btnBuscarImport" runat="server" 
                    onclick="btnBuscarImport_Click" />
            </td>
            <td class="style52">
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label5" runat="server" style="font-size: x-small" 
                    Text="Usado en"></asp:Label>
            </td>
            <td class="style36">
                <asp:DropDownList ID="dpUsadoEn" runat="server" Width="200px"  
                    CssClass="esdTextBox"  > 
                     
                
                </asp:DropDownList>
            </td>
            <td class="style64">
                &nbsp;</td>
            <td class="style47">
                &nbsp;</td>
            <td align="right" class="style67">
                <asp:Label ID="Label16" runat="server" style="font-size: x-small" Text="Moneda"></asp:Label>
            </td>
            <td align="left" class="style69">
                <asp:DropDownList ID="dpNoneda" CssClass="esdTextBox"  runat="server" 
                    Width="100px">
                </asp:DropDownList>
            </td>
            <td class="style41" colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label6" runat="server" style="font-size: x-small" 
                    Text="Emitida por"></asp:Label>
            </td>
            <td class="style36">
                <asp:Label ID="lblEmitidoPor" CssClass="esdTextBox" runat="server"></asp:Label>
            </td>
            <td class="style64">
                &nbsp;</td>
            <td align="right" class="style47" colspan="2">
                <asp:Label ID="Label17" runat="server" style="font-size: x-small" 
                    Text="Tipo de cambio"></asp:Label>
            </td>
            <td align="left" class="style69" colspan="3">
                <asp:TextBox ID="txtTipCambio"  CssClass="esdTextBox" runat="server" 
                    Width="50px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label7" runat="server" style="font-size: x-small" 
                    Text="Prioridad"></asp:Label>
            </td>
            <td class="style36">
                <asp:DropDownList ID="dpPrioridad" runat="server" Width="200px"  
                    CssClass="esdTextBox">
                </asp:DropDownList>
            </td>
            <td class="style64">
&nbsp;&nbsp;&nbsp;
            </td>
            <td align="right" class="style47" colspan="2">
                <asp:Label ID="Label18" runat="server" style="font-size: x-small" 
                    Text="Fecha de entrega"></asp:Label>
            </td>
            <td align="left" class="style49" colspan="3">
                <uc1:ucControlFecha ID="ucControlFecha2" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label8" runat="server" style="font-size: x-small" 
                    Text="Observacion"></asp:Label>
            </td>
            <td class="style12" colspan="7">
                <asp:TextBox ID="txtObseracion"  CssClass="esdTextBox" runat="server" 
                    Height="50px" Width="294px"></asp:TextBox>
            </td>
        </tr>
            </table>
                <td style="width: 5px;">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td style="width: 5px;">
                    &nbsp;
                </td>
                <td align="right">
                </td>
                <td style="width: 5px;">
                    &nbsp;
                </td>
            </tr>

        </table>
     </ContentTemplate>

      </asp:UpdatePanel>
 
</div>
  <asp:HiddenField ID="hdnidCliProv" runat="server" />
    <div style="border: 1px solid #ccc; border-radius: 5px; -moz-border-radius: 5px;
                                    -webkit-border-radius: 5px; -ms-border-radius: 5px;">
    <div>
    <asp:Button ID="btnNuevo" runat="server" onclick="btnNuevo_Click"  CssClass="esdButtonStyle"
        Text="Nuevo" />
      <div>


                      <input id="hidId" runat="server" name="hidId" size="1" style="width: 32px; height: 22px" type="hidden" />
                      <input id="hdProducto" runat="server" name="hdColor" size="1" style="width: 32px; height: 22px"
                    type="hidden" />
                    </div>

         <div style="width: 1100px">
                 <div style="overflow: auto; width: 1100px; height: 201px">
                    <div class="DataDetail">
                       
                         <asp:GridView ID="GVDetalleProducto" runat="server"  ScrollBars="Auto" 
                            ScrollWidth="100%" Width="100%" AutoGenerateColumns="False" 
                            ShowHeaderWhenEmpty="True" onrowcommand="GVDetalleProducto_RowCommand" 
                            onrowdatabound="GVDetalleProducto_RowDataBound" 
                             onrowdeleting="GVDetalleProducto_RowDeleting" > 
                            
                           
                         <AlternatingRowStyle CssClass="esdGridAlternativeRowStyle" />
            
                    <Columns>
                     <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="grdBttCmdEdit" CommandName="CmdEdit" CommandArgument="<%# Container.DataItemIndex %>"
                                    runat="server" ImageUrl="../Images/Icons/Enabled/Edit.png" 
                                    ToolTip="Filtrar Producto" />
                            </ItemTemplate>
                            <HeaderStyle Width="22px" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>

                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="grdBttCmdMost" CommandName="CmdMst" CommandArgument="<%# Container.DataItemIndex %>"
                                    runat="server" ImageUrl="../Images/Icons/Enabled/HISTAPRO.png" 
                                    ToolTip="Mostrar el Registro" />
                            </ItemTemplate>
                            <HeaderStyle Width="22px" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>

                       <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkBxSelect" runat="server" />
                                    </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="N°">
                            <ItemTemplate>
                                <asp:TextBox ID="txtNumCorrelativo"  CssClass="esdTextBox"  runat="server"  Text='<%# DataBinder.Eval(Container, "DataItem._Nu_Correla") %>'
                                 Width="50px"></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                            <ItemStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="idProducto" Visible="False">
                            <ItemTemplate>
                                <asp:TextBox ID="txtIdproducto" runat="server"  CssClass="esdTextBox"  
                                    Width="100px"  Text='<%# DataBinder.Eval(Container, "DataItem._Codigo") %>' 
                                    Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                            <ItemStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Id pres" Visible="False">
                            <ItemTemplate>
                                <asp:TextBox ID="txtIdPres" runat="server" CssClass="esdTextBox"  Width="50px"  
                                    Text='<%# DataBinder.Eval(Container, "DataItem._Pres") %>' Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                            <FooterStyle Font-Size="X-Small" />
                           
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Producto">
                            <ItemTemplate>
                                <asp:TextBox ID="txtDsProducto" runat="server" CssClass="esdTextBox"  
                                    Width="200px"  Text='<%# DataBinder.Eval(Container, "DataItem._Producto") %>' 
                                    Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Presentacion">
                            <ItemTemplate>
                                <asp:TextBox ID="txtPresentacion" runat="server" CssClass="esdTextBox"  
                                    Width="50px"  Text='<%# DataBinder.Eval(Container, "DataItem._Presenta") %>' 
                                    Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                           <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="U.M">
                            <ItemTemplate>
                                <asp:TextBox ID="txtUM" runat="server" CssClass="esdTextBox"  Width="50px"  
                                    Text='<%# DataBinder.Eval(Container, "DataItem._UM") %>' Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Peso Bruto" Visible="False">

                            <ItemTemplate>
                                <asp:TextBox ID="txtPesoBruto" runat="server" CssClass="esdTextBox"  
                                    Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._Peso_Bruto") %>' 
                                    Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Lote">
                            <ItemTemplate>
                                <asp:TextBox ID="txtLote" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._Lote") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Fec. Vencimiento">
                            <ItemTemplate>
                                <asp:TextBox ID="txtFecVencimiento" runat="server" CssClass="esdTextBox" 
                                    Width="75px" Text='<%# DataBinder.Eval(Container, "DataItem._fe_venc") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Fec.Entrega">
                            <ItemTemplate>
                                <asp:TextBox ID="txtFecEngrega" runat="server" CssClass="esdTextBox" 
                                    Width="75px" Text='<%# DataBinder.Eval(Container, "DataItem._fe_Entrega") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="O.P">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpdOP" runat="server" Width="100px" >
                                    <asp:ListItem Value="P000002">Bocanegra</asp:ListItem>
                                    <asp:ListItem Value="P000003">Faucett</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Cantidad">
                            <ItemTemplate>
                                <asp:TextBox ID="txtCantidad" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._Cant") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="p.Neto">
                            <ItemTemplate>
                                <asp:TextBox ID="txtPneto" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._PreNeto") %>'></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="P.U">
                            <ItemTemplate>
                                <asp:TextBox ID="txtPU" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._PreUnit") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ControlStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>

                          <asp:TemplateField HeaderText="%Desc">
                             
                              <ItemTemplate>
                                  <asp:TextBox ID="txtPorDesc"  CssClass="esdTextBox"  runat="server" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._nu_pordscto") %>'></asp:TextBox>
                              </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Afect.IGV">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkBxIGV" runat="server"  />
                                    </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="T.G">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpTG" runat="server" Width="150px">
                                </asp:DropDownList>
                            </ItemTemplate>
                            <ControlStyle Font-Size="X-Small" />
                            <FooterStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Und.Negocio">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpdUN" runat="server" Width="150px" AutoPostBack="True" 
                                    onselectedindexchanged="dpdUN_SelectedIndexChanged">
                                </asp:DropDownList>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="C.C">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpdCC" runat="server" Width="150px"  AutoPostBack="True" 
                                    onselectedindexchanged="dpdCC_SelectedIndexChanged"  >
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="idCosto">
                            <ItemTemplate>
                                <asp:TextBox ID="txtIdccostos" CssClass="esdTextBox"  runat="server" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._idCosto") %>' ></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="dsCosto" Visible="False">
                            <ItemTemplate>
                                <asp:TextBox ID="txtdsCosto" CssClass="esdTextBox"  runat="server" Width="150px" Text='<%# DataBinder.Eval(Container, "DataItem._C_Costos") %>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                         <asp:TemplateField HeaderText="Gto.Import">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpdGtoImport" runat="server" Width="150px">
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>

                          <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="grdBttCmdCalcular" CommandName="CmdCalc" CommandArgument="<%# Container.DataItemIndex %>"
                                    runat="server" ImageUrl="../Images/Icons/Enabled/Calculator.png" 
                                    ToolTip="Actualizar Totales"/>
                            </ItemTemplate>
                            <HeaderStyle Width="22px" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Dscto">
                            <ItemTemplate>
                                <asp:TextBox ID="txtDscto" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._Dscto") %>'></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="IGV">
                            <ItemTemplate>
                                <asp:TextBox ID="txtIGV" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._Igv") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Sub. Total">
                            <ItemTemplate>
                                <asp:TextBox ID="txtSubTotal" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._subTotal") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        
                       <asp:TemplateField>
                             <ItemStyle HorizontalAlign="Center" Width="40px" CssClass="etiqueta"></ItemStyle>
                             <ItemTemplate>
                             <asp:ImageButton ID="btnEliminar" runat="server" ImageUrl="~/Images/Icons/Enabled/bt_borrar.gif"
                                 CommandName="CmdDel" 
                                 CommandArgument='<%# Container.DataItemIndex%>'>
                              </asp:ImageButton>
                            </ItemTemplate>
                           </asp:TemplateField>

                    </Columns>
                     <HeaderStyle CssClass="esdGridHeaderStyle" />
                        <PagerStyle CssClass="gridPagerStyle" />
                        <RowStyle CssClass="esdGridRowStyle" />
                        <SelectedRowStyle CssClass="esdGridSelectedRowStyle" />
                       <EmptyDataTemplate>
                        <div id="gridempty">
                            <asp:Image ID="imgEmpty" runat="server" ImageUrl="../Images/Controls/Attention.png" />
                            &nbsp;No existen registros para esta solicitud.
                        </div>
                    </EmptyDataTemplate>
                </asp:GridView>
                </div>
           
                   </div>
                         <div align="right">
                                    <div>
                                     <asp:Label ID="lblDsc" runat="server"  Text="Tot.Desc:"></asp:Label>
                                 
                                      <asp:TextBox ID="txtDescuento" runat="server" CssClass="esdTextBox"></asp:TextBox>
                                    </div>

                                     <div>
                                         <asp:Label ID="lblIgv" runat="server" Text="Tot.IGV :"></asp:Label>
                                  
                                      <asp:TextBox ID="txtIgv_" runat="server" CssClass="esdTextBox"></asp:TextBox>
                                    </div>
                                    <div>
                                
                                         <asp:Label ID="lblTotal" runat="server" Text="Total    :"></asp:Label>
                                                                 
                                        <asp:TextBox ID="txtTotal_" runat="server" CssClass="esdTextBox"></asp:TextBox>
                                    </div>
                                </div>
                   </div>
   
      </div>
      </div>
         <div>
                   <asp:Label ID="lblMensaje" runat="server" Text=""></asp:Label>
       </div>
         <br />
        <br />
        <br />

        <input id="HddIdEmitidopor" type="hidden" runat ="server"/>
         <input id="hddIdOC" type="hidden" runat ="server" />
        <input id="hddCodigo" type="hidden" runat ="server" />
        <input id="hddPres" type="hidden" runat ="server"/>
        <input id="hddProducto" type="hidden" runat ="server"/>
        <input id="hddPresenta" type="hidden" runat ="server"/>

        <input id="hddUm" type="hidden" runat ="server"/>
        <input id="hddPesoBruto" type="hidden" runat ="server"/>

         <input id="hidVentana" runat="server" name="hidVentana" size="1" style="width: 32px;
                    height: 22px" type="hidden" />
         <br />

  
      <asp:HiddenField ID="HiddenField1" runat="server" />
   
    </form>
</body>
</html>
